public class Test {
    //本题主要考察，个位的9怎么判断，十位的9怎么判断？另外99是两个9.



    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if(i % 10 == 9) {//判断个位的9
                count++;
            }
            if(i/10 == 9) {
                count++;//判断十位的9
            }
        }
        System.out.println(count);
    }
    public static void main12(String[] args) {
        int i;
        int count = 0;
        for(i = 1; i <= 100; i++) {
            if(i %10 == 9) {
                count++;
            }
            if(i / 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main2(String[] args) {
        int i;
        for (i=1000; i<=2000; i++) {
            if( i%4 == 0 && i%100 != 0 || i % 400 == 0) {
                System.out.println(i+"是闰年");
            }
        }
    }
    public static void main111(String[] args) {
        int i;
        int j;
        for(i = 2; i <= 100; i++) {
            for(j = 2; j < i; j++) {
                if(i % j == 0) {
                    break;
                }
            }
            if( j >= i) {
                System.out.println(i+"是素数");
            }
        }
    }
    public static void main11(String[] args) {
        int i = 3;
        int n = i;
        int j = 2;
        for(j = 2;j < n;j++) {
            if(i % j == 0) {
                break;
            }
        }
        if(i % j != 0) {
            System.out.println(i+"不是素数");
        }
        else {
            System.out.println(i+"是素数");
        }
    }
    public static void main1(String[] args) {
      /*  double x=2.0;
        int y=4;
        x/=++y;
        System.out.println(x);*/
        int a = 10;
        System.out.println(a);
    }
}